<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <style>
        div{ 
            width: 100px;
            height: 300px;
            background-color: skyblue;
            position: absolute;
            left: 100px;
        }

        .shake{
            animation: shake .6s ease-in-out infinite;
        }

        @keyframes shake {
            0%{
                left: 100px
            }

            25%{
                left: 120px;
            }

            50%{
                left: 85px;
            }

            75%{
                left: 115px;
            }

            100%{
                left: 100px;
            }
        }
    </style>
</head>
<body>
    <div class="shake"></div>
</body>
</html>